/**
 * 文件名：ScEventType.java
 *
 * 创建人：Fyh - 1009173473@qq.com
 *
 * 创建时间：2019年10月14日 下午3:19:00
 *
 * 版权所有：南京植百汇智能科技服务有限公司
 */
package com.z100h.supplychain.core;

/**
 * [描述信息：说明类的基本功能]
 *
 * @author Fyh - 1009173473@qq.com
 * @version 1.0 Created on 2019年10月14日 下午3:19:00
 */
public enum ScEventType {
	CREATEPURCHASEORDER("采购创建", "0"), FINISHPURCHASEORDER("采购完成", "1"), CREATEWAREHOUSERECEIPT("入库创建",
			"2"), FINISHWAREHOUSERECEIPT("质检入库", "3"), CREATESTOCKOUT("生产创建",
					"4"), QCSTOCKOUTSUCCESS("生产质检合格", "5"), QCSTOCKOUTFAILURE("生产质检不合格", "6"), OUTSTOCKOUT("生产出库", "7");

	private String name;

	private String type;

	private ScEventType(String name, String type) {
		this.name = name;
		this.type = type;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static ScEventType get(String type) {
		switch (type) {
			case "0":
				return CREATEPURCHASEORDER;
			case "1":
				return FINISHPURCHASEORDER;
			case "2":
				return CREATEWAREHOUSERECEIPT;
			case "3":
				return FINISHWAREHOUSERECEIPT;
			case "4":
				return CREATESTOCKOUT;
			case "5":
				return QCSTOCKOUTSUCCESS;
			case "6":
				return QCSTOCKOUTFAILURE;
			default:
				return OUTSTOCKOUT;
		}
	}
}
